<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta content="text/html;charset=utf-8">

<title>用户登录</title>
<link href="resources/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="resources/bootstrap/css/bootstrap-theme.min.css" rel="stylesheet">
<link href="resources/css/index.css" rel="stylesheet">

</head>
<body>
	<h2 style="text-align:center">
		<span class="glyphicon glyphicon-user"></span>用户登录
	</h2>
	<div class="container">
	<div class="row">
		<s:if test="actionErrors.size()>0 || fieldErrors.size()>0">
			<div
				class="alert alert-danger col-sm-7 col-sm-offset-2">
				<s:actionerror />
				<s:fielderror />
			</div>
		</s:if>
	</div>

	<s:form id="subform" class="form-horizontal" action="checkLogin" method="post">
		<div class="form-group">
			<label for="account" class="col-sm-2 col-sm-offset-1 control-label">用户邮箱</label>
			<div class="col-sm-6">
				<input type="email" class="form-control" name="user.email"
					value="${user.email }" placeholder="Email">
			</div>
		</div>
		<div class="form-group">
			<label for="password" class="col-sm-2 col-sm-offset-1 control-label">密码</label>
			<div class="col-sm-6">
				<input type="password" class="form-control" name="user.password"
					value="${user.password }" placeholder="password">
			</div>
		</div>
		<div class="form-group">
			<div class="col-sm-offset-2 col-sm-10">
				<div class="checkbox">
					<label><input type="radio" name="user.loginType" checked
						value="0">管理员</label> 
					<label> <input type="radio"
						name="user.loginType" value="1" <s:if test="user.loginType==1">checked</s:if>>员工</label>
				</div>
			</div>
		</div>
		<div class="form-group">
			<div class="col-sm-offset-2 col-sm-10">
				<div class="checkbox">
					<label><input type="checkbox" id="remPwd" onclick="remPwds();" value="0"
						name="rememberPwd">记住密码</label>
				</div>
			</div>
		</div>
		<div class="form-group">
			<div class="col-sm-offset-2 col-sm-7">
				<div class="btn-group btn-group-justified">
					<a href="checkLogin.do" class="btn btn-info">
						<button type="submit" style="width:100%;background:none;border:0;">登录</button></a>
					<a href="reg.do" class="btn btn-info">注册</a>
				</div>
			</div>
		</div>
	</s:form>
	</div>
	
	<script src="resources/bootstrap/js/jquery.min.js"></script>
	<script src="resources/bootstrap/js/bootstrap.min.js"></script>
	<script src="resources/js/common.js"></script>
</body>
</html>
